package com.wb.core08_常用类.可变字符串.练习;

import java.util.Scanner;

/**
 * @author 黄衡熙
 * @version 1.0
 */
// 控制台输入一个字符串,删除字符串下标为偶数的所有字符
public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个字符串:");
        String s = sc.nextLine();
        StringBuilder b = new StringBuilder(s);
        for(int i=b.length()-1;i>=0;i--){
            if(i%2==0){
                b.deleteCharAt(i);
            }
        }

        System.out.println(b.toString());



    }

}
